﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using KPIS.GERP.GHRMS.BLL;
using KPIS.GERP.GHRMS.MODEL;
using KPIS.GERP.GHRMS.IBLL;
using Telerik.Web.UI;

namespace KPIS.GERP.GHRMS.APP.App_UI.Forms
{
    public partial class TR_ScholarshipFundsDtls : System.Web.UI.Page
    {
        TrainingScholarshipDtlsBLL SchDtlsBLL = new TrainingScholarshipDtlsBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadDataGrid();
            }
            
        }
        
        private void LoadDataGrid()
        {
            DataSet ListSchDtls = SchDtlsBLL.GetDataScholarshipDtls(Request.QueryString["Sequence"].ToString());
            DataTable table = ListSchDtls.Tables[0];
            RadGrid2.DataSource = ListSchDtls.Tables[0];
            RadGrid2.DataBind();            
        }

        protected void RadGrid2_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == "Delete")
            {
                //int seq = Convert.ToInt32((e.Item as GridDataItem).OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Sequence"]);
               // iniData.DeleteScholarshipFunds(seq, "1");
            }
            LoadDataGrid();
        }
    }
}
